//package com.itany.cloud.controller;
//
//import com.itany.cloud.config.DataSourceConfig;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.cloud.context.config.annotation.RefreshScope;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//@RestController
//@RequestMapping("/config")
//// 使用@RefreshScope注解标注,表示使用动态更新的配置
//// 当配置中心中的信息发生改变时,会自动刷新,不需要重新服务
//@RefreshScope
//public class NacosConfigController {
//
//    @Value("${datasource.driver}")
//    private String driver;
//    @Value("${datasource.url}")
//    private String url;
//    @Value("${datasource.username}")
//    private String username;
//    @Value("${datasource.password}")
//    private String password;
//
//
//    @GetMapping("/find")
//    public DataSourceConfig find(){
//        return new DataSourceConfig(driver,url,username,password);
//    }
//
//}
